package com.oracle.entity;

public class ResultBean {
    private Integer code;
    private String message;
    private Object data;

    public ResultBean() {
    }

    public ResultBean(Integer code, String message, Object data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }


    public static ResultBean getResultBean(Integer code,String message,Object data){
        return new ResultBean(code,message,data);
    }

    public static ResultBean success(String message,Object data){
        return new ResultBean(200,message,data);
    }

    public static ResultBean fail(String message,Object data){
        return new ResultBean(400,message,data);
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    @Override
    public String toString() {
        return "ResultBean{" +
                "code='" + code + '\'' +
                ", message='" + message + '\'' +
                ", data=" + data +
                '}';
    }
}
